angular.module('routes', [])
    .config(function ($stateProvider, $urlRouterProvider) {
        $stateProvider
            //主页
            .state("main", {
                url: '/main',
                views: {
                    "": {
                        templateUrl: 'page/main/main.html',
                        controller: 'mainCtrl'
                    },
                    "header@main": {
                        templateUrl: 'page/main/header.html',
                        controller: 'headerCtrl'
                    },
                    "nav@main": {
                        templateUrl: 'page/main/nav.html',
                        controller: 'navCtrl'
                    },
                    "music_player@main": {
                        templateUrl: 'page/music/music_player.html',
                        controller: 'music_playerCtrl'
                    }
                }
            })
            //音乐播放器
            /*.state("music_player", {
                url: '/main/!*!/music_player',
                templateUrl: 'page/music/music_player.html',
                controller: 'music_playerCtrl'
            })*/
            /*.state("music_player", {
                url: '/music_player',
                views: {
                    "": {
                        templateUrl: 'page/music/music_player.html',
                        controller: 'music_playerCtrl'
                    }
                }
            })*/
            //音乐资讯
            .state("main.music_information", {
                url: '/music_information',
                templateUrl: 'page/music/music_information.html',
                controller: 'music_informationCtrl'
            })
            //音乐类型
            .state("main.music_type", {
                url: '/music_type',
                templateUrl: 'page/music/music_type.html',
                controller: 'music_typeCtrl'
            })
            //听歌
            .state("main.music_listen", {
                url: '/music_listen',
                templateUrl: 'page/music/music_listen.html',
                controller: 'music_listenCtrl'
            })
            //视频首页
            .state("main.video_index", {
                url: '/video_index',
                templateUrl: 'page/video/video_index.html',
                controller: 'video_indexCtrl'
            })
            //视频详情页
            .state("main.video_detail", {
                url: '/video_detail',
                templateUrl: 'page/video/video_detail.html',
                controller: 'video_detailCtrl'
            })
            //用户登陆
            .state("user_login", {
                url: '/user_login',
                templateUrl: 'page/user/user_login.html',
                controller: 'user_loginCtrl'
            })
            //用户登陆
            .state("user_register", {
                url: '/user_register',
                templateUrl: 'page/user/user_register.html',
                controller: 'user_registerCtrl'
            })
        ;

        $urlRouterProvider.otherwise("/main/music_information");
    });